﻿using System;

namespace Whoever.Framework.Attributes
{
	[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
	public sealed class ExportableAttribute : Attribute
	{
		private readonly bool isExportable;
		//Orden por defecto
		private int order = int.MaxValue;

		public ExportableAttribute(bool isExportable, int order)
		{
			this.isExportable = isExportable;
			this.order = order;
		}

		public ExportableAttribute(bool isExportable)
		{
			this.isExportable = isExportable;
		}

		public ExportableAttribute()
		{
			this.isExportable = true;
		}

		public bool IsExportable
		{
			get { return isExportable; }
		}

		public int Order
		{
			get { return order; }
			set { this.order = value; }
		}
	}
}